package poker;

/**
 * This class represent the player.
 *
 * @author guglielmo90
 */
public class Player {
    
    private String nickname;
    private int stack, position, seat;
    private Hand hand;
    
    public Player(){
    
        nickname = null;
        stack = 0;
        hand = null;
        position = 0;
        seat = 0;
    
    }
    
    public Player(String nickname, int stack, Hand hand, int position, int seat){
    
        this.nickname = nickname;
        this.stack = stack;
        this.hand = hand;
        this.position = position;
        this.seat = seat;
        
    }
    
    public void lose(int size){
    
        stack = stack - size;
    
    }
    
    public void win(int size){
    
        stack = stack + size;
    
    }
    
    public int getPosition(){
    
        return position;
    
    }
    
    public void setPosition(int position){
    
        this.position = position;
    
    }
    
    public void setHand(Hand hand){
    
        this.hand = hand;
    
    }
    
    public String getNickname(){
    
        return this.nickname;
    
    }
    
    public int getSeat(){
    
        return this.seat;
    
    }
    
    public int getStack(){
    
        return this.stack;
    
    }
    
    public Hand getHand(){
    
        return hand;
    
    }
    
    @Override
    public String toString(){
    
        return(this.nickname + "\n  " + this.stack + "\n  " + this.hand);
    
    }
        
    
}
